<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/11/17
 * Time: 16:57
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\business;

use app\common\model\mysql\OrderDetail as ModelObj;
use app\common\validate\OrderDetail as ValObj;
use think\Exception;

class OrderDetail extends Base
{
    protected $valObj = null;
    protected $modelObj = null;

    public function __construct()
    {
        $this->valObj = new ValObj();
        $this->modelObj = new ModelObj();
    }

    /**
     * @param int $theatre_id
     * @param array $seat_id
     * @param string $field
     * @return array
     * @throws Exception
     */
    public function getOrderDetailSeatById(int $theatre_id = 0, array $seat_id = [], string $field = "*"){
        try {
            $lists = $this->modelObj->getOrderDetailSeatById($theatre_id, $seat_id, $field);
        }catch (\Exception $e){
            throw new Exception("查询失败");
        }
        return $lists;
    }
}